package com.easylinkin.linkappapi.meterbilling.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easylinkin.linkappapi.meterbilling.entity.BaseBilling;
import com.easylinkin.linkappapi.meterbilling.entity.ext.BaseBillingExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * class info :计费标准mapper
 *
 * @author liuqihang
 * @date 2021/7/12 16:13
 */
public interface BaseMeterBillingMapper extends BaseMapper<BaseBilling> {

    /**
     * 获取计费标准list--分页
     * @param page
     * @param baseBilling
     * @return
     */
    IPage<BaseBillingExt> getBaseBillingList(Page page, @Param("baseBilling") BaseBilling baseBilling);

    /**
     * 获取计费标准
     * @param baseBilling
     * @return
     */
    List<BaseBillingExt> getBaseBillingList(@Param("baseBilling") BaseBilling baseBilling);

    /**
     * 获取计费标准ID根据房间ID和仪表类型
     * @param roomId
     * @param meterType
     * @return
     */
    Integer getBillingIdByRoomAndMeterType(@Param("roomId") Integer roomId, @Param("meterType") Integer meterType);
}
